package com.codegeek.project.slope.domain;

import com.codegeek.common.utils.ReplaceIllegalChar;
import com.codegeek.framework.aspectj.lang.annotation.Excel;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 *
 * @author
 */
@Data
@Builder
public class SlopeAlarmReport {

    @Excel(name = "序号")
    private Long id;

    @Excel(name = "监测内容")
    private String detail;

    @Excel(name = "测点名称")
    private String pointName;

    @Excel(name = "传感器类型")
    private String deviceType;

    @Excel(name = "设备名称")
    private String deviceName;

    @Excel(name = "监测项")
    private String itemName;

    @Excel(name = "坐标位置")
    private String coordinate;

    @Excel(name = "工作状态")
    private Integer workingStatus;

    @Excel(name = "告警等级")
    private Integer alarmLevel;

    @Excel(name = "阈值")
    private Float threshold;

    @Excel(name = "预警阈值")
    private Float alarmThreadhold;

    @Excel(name = "预警实测值")
    private Float alarmValue;

    @Excel(name = "处置状态")
    private Integer state;

    @Excel(name="报警时间")
    private Date alarmTime;

    public void setDetail(String detail) {
        this.detail = new ReplaceIllegalChar().replace(detail);
    }

    public void setPointName(String pointName) {
        this.pointName = new ReplaceIllegalChar().replace(pointName);
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = new ReplaceIllegalChar().replace(deviceType);
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = new ReplaceIllegalChar().replace(deviceName);
    }

    public void setItemName(String itemName) {
        this.itemName = new ReplaceIllegalChar().replace(itemName);
    }

    public void setCoordinate(String coordinate) {
        this.coordinate = new ReplaceIllegalChar().replace(coordinate);
    }
}
